1. Field of the Invention
The present invention relates to a device for demultiplexing motion picture data, including audio and video data, encoded according to a MPEG standard.
2. Discussion of the Related Art
MPEG standards determine the encoding and decoding conditions of motion pictures in the form of a flow of video digital data and a flow of audio digital data. The standards define the encoding conditions of motion pictures, whether associated or not with a sound signal, for storing in a memory and/or for transmitting, for example using Hertzian waves. The standards also define the encoding conditions of the individual picture sequences that form the motion picture to be restored on a screen. Digital pictures are encoded in order to decrease the amount of corresponding data. Encoding generally uses compression techniques and motion estimation. MPEG standards are, for example, used to store picture sequences on laser compact disks, interactive or not, or on magnetic tapes. MPEG standards are also used to transmit pictures, for example, on telephone lines or through Hertzian waves.
The encoding and decoding conditions, defined by MPEG standards, can be obtained from standard organizations; so, only the criteria necessary to understand the present invention is described herein.
The decoding of data encoded according to one of the MPEG standards uses a separation of the data included in the data flow according to its nature. In particular, the video data is separated from audio data, if any, and the audio and video data are separately decoded in suitable audio and video decoders. The data flow also includes system data. The system data includes information relating to the encoding conditions of the data flow and is used to configure the video and audio decoder(s) so that they correctly decode the video and audio data.
Thus, the present invention more particularly applies to the separation of the various data included in the data flow according to their nature. The separation is called the system layer. The system, audio and video data are separated before the individual decoding of the audio and video data.
FIG. 1 represents an exemplary data flow encoded according to MPEG standards. As shown in FIG. 1, the data flow encoded according to MPEG standards includes picture data and system data 1 grouped in packets. The picture data includes video data packets (VIDEO) 2 and, possibly, audio data packets (AUDIO1, AUDIO2) 3 and 4. Several packets of video and/or audio data can be interposed between two packets of system data 1.
In the represented example, two types of audio packets 3 and 4, respectively, are present. Packets 3 and 4 are, for example, audio frames corresponding to two different languages. It should be noted that the data flow can also include various types of video packets. When the data flow includes a plurality of types of video and/or audio data, each packet of a given type is assigned to a respective video decoder, and/or respective audio decoder. In other words, all the video or audio data of a packet of the same type are to be decoded by a predetermined decoder. Each packet, including either system data or picture data (video or audio), starts with a packet start code (PSC) 5.
As shown in FIG. 2, the PSC is a 4-byte code. The first three bytes 6, 7 and 8 are used to identify a PSC, and the fourth byte 9 identifies, in particular, the nature and the type of the related packet. In FIG. 2, the bytes are represented by their hexadecimal value. Thus, the first three bytes 6, 7 and 8 include values "00", "00" and "01", respectively, whereas the fourth byte 9 includes a value "XX" identifying both the nature of the packet (system, video, audio, user data) and the destination of the data included in the packet.
A single packet of picture data (video or audio), may include a plurality of video sequences, or audio sequences, respectively. A packet of video data 2 may include, for example, the data relative to several groups of pictures, to a plurality of pictures or to a plurality of sub-pictures, or macroblocks. An audio packet 3 or 4 may include data related to several audio frames. It should thus be noted that the arrangement in packets of the data flow is independent of the order of picture data. In other words, a picture packet may include data related to several pictures. Also, data related to a single picture may be included in several successive packets.
FIG. 3 illustrates an exemplary content of a video packet. The packet starts with a PSC code 5. The packet includes several sequences, IMAGE1 10, IMAGE2 11, of video data, each sequence starting with a start code SC 12. In the represented example, a sequence IMAGE0 13 ends in the represented packet. Thus, the SC code related to the sequence IMAGE0 was included in a video packet of the same type, which preceded the represented packet in the data flow.
The data flow also includes synchronization data for achieving both the synchronization of the sound with respect to the picture and the synchronization of the decoding rate at which the pictures have been encoded. Indeed, the duration of the data representing a picture varies from one picture to another.
Time synchronization TS 14 (FIG. 1) strobes can be included in the various picture packets 2, 3 or 4. The synchronization strobes are predominantly used to synchronize the video or audio decoder to which a picture packet is assigned. Two main types of synchronization strobes 14 are associated with the picture packets. PTS strobes indicate the time position, or display date of the picture provided by the decoding of the first picture included in the packet. For a video packet 2, it is, for example, the date at which the picture, whose code is located after the first SC picture start code 12 included in the packet must be displayed. For an audio packet 3 or 4, it is the date at which it is required to restore (play), once decoded, the first audio frame included in the packet. The synchronization strobe may also be a DTS strobe indicating the time position, or date, of the decoding of the first picture included in the packet (decoding having been previously performed according to a different display order).
SCR strobes 15 for synchronizing the system data can be included in the system packets 1. The SCR strobes of the system clock are mainly used to synchronize the decoding rate of the pictures with respect to their encoding rate.
Each system packet 1 or picture packet 2, 3 or 4 does not necessarily include a time strobe. MPEG standards determine the maximum time difference (for example, 0.7 second) which may separate, in the data flow, two successive time strobes TS 14 or SCR 15 of the same packet type.
The main role of the system layer of a MPEG decoder is to separate the data packets while maintaining synchronization of the sound with respect to the picture and the synchronization of the reference or display rate of the pictures with respect to the rate at which they are encoded.
Conventionally, the separation, or sorting, of data packets included in the data flow encoded according to one of the MPEG standards is achieved by the software of a microprocessor included in the picture restoring unit. Such a unit is, for example, a microcomputer including, as peripheral device, a compact disk player.
A drawback of the conventional processing of the system layer results from the need to use a very fast microprocessor capable of processing data flow in real time. A further drawback, especially present when the restoring device is a microcomputer likely to have other tasks, is that the processing of the system layer monopolizes the microcomputer. The microcomputer is then no longer capable of performing other programs or tasks except if the picture display speed is not given precedence. Indeed, to comply with the display speed, the interruptions generated by the system layer should have priority over the other interruptions.